xquery version "1.0";

for $b in
//entries/GlueSE/GlueSEControlProtocol[@GlueSEControlProtocolVersion='2.2.0']/@GlueSEControlProtocolEndpoint/../../GlueSA[@GlueSAFreeOnlineSize!=0]/GlueVOInfo[@GlueVOInfoAccessControlBaseRule='engage']/@GlueVOInfoPath/../../..
let $endpoint := string($b/GlueSEControlProtocol[@GlueSEControlProtocolVersion='2.2.0']/@GlueSEControlProtocolEndpoint)
let $rootpath := string($b/GlueSA[@GlueSAFreeOnlineSize!=0]/GlueVOInfo[@GlueVOInfoAccessControlBaseRule='engage']/@GlueVOInfoPath)
return
concat("srm", substring($endpoint, 6), $rootpath,  "/TESTFILE", "&#xA;")
